(function(window){
    const MyPlugin = {};
    MyPlugin.install = function(Vue,options){
        //添加Vue全局的属性和方法
        Vue.globalMethod = function(){
            console.log('添加全局的方法或者属性')
        }
        Vue.directive('upper',(el,binding)=>{
            el.innerText = binding.value.toUpperCase();
        })
        // 在原型对象上添加属性和方法 供实例对象使用
        Vue.prototype.yuanxing = function(){
            console.log('xxxx');
        }
    }
    window.MyPlugin = MyPlugin;

})(window)

// ((window)=>{})(window)